#ifndef JDir_H
#define JDir_H

#include <JXQCore/JXQGlobal>
#include <JXQCore/JStringList>

namespace JXQ
{

class JDirPrivate;

class JXQLIB_EXPORT JDir
{
public:
	JDir(const JString &path = "");
	~JDir();

public:
	void setCurrentPath(const JString &path);
	JString currentPath() const;

	inline JStringList content() const;
	inline JStringList currentPathDirs() const;

	bool find(const JString &fileName) const;

public: // global
	static void cd(const JString &path);
	static JString pwd();
	static JStringList ls();
	static JStringList pwdDirs();

public:
	static bool isDir(const JString &path);

private:
	J_DISABLE_COPY(JDir)
	JDirPrivate *d_ptr;
};

} //namespace JXQ


#endif //JDir_H
